package com.action;

import com.service.SendMailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SendMailAction {

    @Autowired
    private SendMailService sendMailService;

    @RequestMapping("/api/sendMail")
    public String sendMail(String toMail){
        System.out.println(toMail);
        sendMailService.sendMail(toMail,"邮件注册验证码","123456");
        return "success";
    }
}
